Repository navigation
Add consult-ghostel-sources and ghostel-annotation-function - #800
Merged
Merged
Conversation
Packages that show their own content in ghostel buffers could not add a source to the `consult-ghostel' pickers or text to a buffer's picker annotation. `consult-ghostel-sources' and `consult-ghostel-project-sources' hold the sources `consult-ghostel' and `consult-ghostel-project' pick from, like `consult-buffer-sources'. `ghostel-annotation-function' is a buffer-local function called in the buffer without arguments. `ghostel-annotate-buffer' shows its string between the program status and the title, so it reaches `ghostel-list-buffers', the consult sources and marginalia. An error in it is ignored, as the annotation runs for every candidate of every buffer prompt. Document how to make `project-kill-buffers' kill ghostel buffers.
dakra
force-pushed
the
consult-ghostel-sources
branch
from
November 10, 2026 13:52
ec360c0 to
6dfe798
Compare
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two hooks for packages that show their own content in ghostel buffers, such as a multiplexer client whose panes are processless ghostel buffers.
consult-ghostel-sourcesA defcustom holding the sources
consult-ghostelpicks from, likeconsult-buffer-sources. The default is the former fixed list,(consult-ghostel-source consult-ghostel-source-new). A package can append a hidden source with its own narrow key and:newfunction.consult-ghostel-projectandconsult-ghostel-statuskeep their fixed lists.ghostel-annotation-functionA buffer-local function, nil by default, called in the buffer without arguments.
ghostel-annotate-buffershows the string it returns between the program status and the title, so it reachesghostel-list-buffers, the consult sources and marginalia.An error in the function adds nothing to the annotation instead of propagating: with
consult-ghostel-modethe annotation runs for every candidate of every buffer prompt. Underdebug-on-errorit still reaches the debugger.With both variables untouched, the pickers and annotations are unchanged.
Testing
make -j8 allpasses. New tests:consult-ghostel-test-sourcesandghostel-test-annotate-buffer-function.